/**
 *售后信息维护
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 获取列表
export const getAfterSaleInfo = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/dealerAfterSaleInfo/getAfterSaleInfo`, {params});
// 删除
// export const deleteRole = (id) => axios.delete(`${SERVER.DMSCLOUD_BASEDATA}/basedata/roles/deleteById/${id}`, {id: Number(id)} );
//新增
export const addSaleInfoMaintain = params => axios.post(`${SERVER.DMSCLOUD_BASEDATA}/dealerAfterSaleInfo/insertAfterSaleInfo`,  params );
//编辑
export const updateAfterSale = params => axios.put(`${SERVER.DMSCLOUD_BASEDATA}/dealerAfterSaleInfo/updateAfterSale`,  params );
//所属区域
export const getOrgType = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/dealerSaleInfo/getOrgType `);
//售后区域
export const insertAfterSaleInfo = params => axios.post(`${SERVER.DMSCLOUD_BASEDATA}/dealerAfterSaleInfo/insertAfterSaleInfo`,params);
//所属区域
export const getMerge = id => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/company/org/getMerge`);

//所属区域--大区小区
export const getOrgByOrgType = (orgType) => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/org/getOrgByOrgType?orgType=${orgType}`);
